package com.liyiruo;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/**
 * @author liyiruo
 * @Description
 * @Date 2024/6/2 上午12:28
 */
public class Log4j2Main {
    private static Logger logger1 = LogManager.getLogger(LogManager.ROOT_LOGGER_NAME);
    private static Logger logger = LogManager.getLogger(Log4j2Main.class);

    public static void main(String[] args) {

        logger.trace("trace level");
        logger.debug("debug level");
        logger.info("info level");
        logger.warn("warn level");
        logger.error("error level");
        logger.fatal("fatal level");

        logger.error("字符串拼接一：{},记录main执行：", "logger");
        logger.error("字符串拼接二：", "logger");

    }
}
